/* sched.h
 * By: Ariq Chowdhury
 * Date created: March 7th 2011
 * Date modified: March 7th 2011
 */

#ifndef _XXXOS_SCHED_H
#define _XXXOS_SCHED_H

#include <proc.h>

/*********************************/
/*** Functions *******************/
/*********************************/

/* Function add_process
 * task_struct* -> void
 * Pre: proc is a pointer to the task struct to be added to the run queue
 * Post: Runqueue will have proc appended at the end of queue
 * Returns: void
 */
void add_process(struct task_struct* proc);

/* Function remove_process
 * task_struct* -> void
 * Pre: proc is pointer to the task struct to be removed from the run queue
 * Post: Runqueue no longer has proc on the queue
 * Returns: void
 */
void remove_process(struct task_struct* proc);

/* Function pick_process
 * void -> void
 * Pre: 
 * Post: The first process on the highest priority becomes the current running process
 * Returns: void
 */
void pick_process();

/* Function Schedule
 * void -> void
 * Pre:
 * Post: Processes will be scheduled in the runqueue by round robin
 * Returns: void
 */
void schedule();

void kernel_panic(void);

#endif /* _XXXOS_SCHED_OS */
